﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChatService
{
    public class ChannelDTO
    {
        public int ChannelID { get; set; }
        public string ChannelName { get; set; }

        public static ChannelDTO CreateFromChannel(Channel channel)
        {
            ChannelDTO chanellDTO = new ChannelDTO();
            chanellDTO.ChannelID = channel.ChannelID;
            chanellDTO.ChannelName = channel.Name;
            return chanellDTO;
        }

        public Channel ToChannel()
        {
            Channel channel = new Channel();
            channel.ChannelID = this.ChannelID;
            channel.Name = this.ChannelName;
            return channel;
        }
    }
}
